<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="王劲翔">
    <title>Document</title>
</head>

<body>
    <script>
        const arr5 = [
            { id: 1, name: '小强', score: 18 },
            { id: 2, name: '小明', score: 2000 },
            { id: 3, name: '小丽', score: 8 },
            { id: 4, name: '小美', score: 5000 },
        ]
        function filterData(arr, exclude) {
            return arr.filter(item => item.name !== exclude).map(item => item.name)
        }
        // console.log(filterData(arr5, '小强'));
    </script>
</body>

</html>